<html xmlns:th="http://www.thymeleaf.org"
	  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<div th:replace="common/commoncss :: commoncss"></div>
<div th:fragment="navlist">
<div class="col-md-12 green" >
	<!--导航栏左侧按钮，-->
	<ul class="nav navbar-nav navbar-left" style="margin-left: -15px;">
		<li><a href="#" class="green-none white">
			<span class="glyphicon glyphicon-menu-hamburger"></span></a></li>
	</ul>
	<!--右侧导航栏-->
	<ul class="nav navbar-nav navbar-right moredeep">
		<li>
			<a th:href="@{/notice/list}" class="green-none white" target="content">
			<span class="glyphicon glyphicon-bell"></span>
			<span class="badge blue-badge badge-notice"></span>
			<span class="badge blue-badge badge-notice"></span>
			</a>
		</li>
		<li>
			<a th:href="@{/daycalendar}" class="green-none white" target="content">
				<span class="glyphicon glyphicon-calendar"></span>
				<span class="badge yellow-badge badge-mail"></span>
				<span class="badge yellow-badge badge-mail"></span>
			</a>
		</li>
		<li>
			<a th:href="@{/process/flowmanage}" class="green-none white" target="content">
				<span class="glyphicon glyphicon-hourglass"></span>
				<span class="badge red-badge"></span>
				<span class="badge red-badge"></span>
			</a>
		</li>
		<li class="dropdown">
		<!--设置导航栏头像面板--> 
		<a href="#" class="green-none white" data-toggle="dropdown">
			<img th:src="@{'/public/user/' + ${aoaUser.imgPath}}" class="user-image" />
			<span sec:authentication="name"></span>
		</a> <!--设置点击按钮弹出用户面板层-->
			<ul class="dropdown-menu" style="padding:0;">
				<li class="user-header green"><img th:src="@{'/public/user/' + ${aoaUser.imgPath}}" class="img-circle" style="width: 100px;height:100px;" />
					<p class="white" style="">
						<span th:text="${aoaDept.deptName}"></span> /
						<span th:text="${aoaRole.roleName}"> </span><br>
						<small th:text="${aoaPosition.name}"></small>
					</p></li>
				<li class="user-footer">
					<div class="pull-left">
						<a th:href="@{/a/user/modifyPwd}" class="btn btn-default" target="content">修改密码</a>
					</div>
					<div class="pull-right">
						<a th:href="@{/a/user/logout}" class="btn btn-danger">退出登录</a>
					</div>
				</li>
			</ul>
		</li>

</ul>
</div>
<script>
	function changeemail(){
		var email=$('.badge-mail').text().trim();
		var emailNum=parseInt(email);
		if(emailNum>1){
			$('.badge-mail').text((emailNum-1));
		}else{
			$('.badge-mail').text("");
		}
	}
	function changeinformation(){
		var email=$('.badge-notice').text().trim();
		var emailNum=parseInt(email);
		if(emailNum>1){
			$('.badge-notice').text((emailNum-1));
		}else{
			$('.badge-notice').text("");
		}
	}
	//从右往左滑动效果
	$(function() {
		var num = 1;
		$("#history").click(function() {
			num++;
			if (num % 2 == 0) {
				$("#historypanel").css({ //从右边飞入，使用绝对定位来操作
					"width" : "230px",
					"right" : "-230px"
				}).show().animate({
					"right" : "0"
				}, "fast");
			} else
				$("#historypanel").animate({
					"width" : "toggle"
				}, "slow");
			$('#historypanel').load('/userlogs');

		})
	})
</script>
</div>
</html>